/*
 * @Author: 李环玉 834654733@qq.com
 * @Date: 2023-12-21 22:22:51
 * @LastEditors: 李环玉 834654733@qq.com
 * @LastEditTime: 2023-12-23 18:01:31
 * @FilePath: \vue3-ts-vite\src\api\menu.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 获取路由
export function getMenu (){
  return request({
    url: '/system/menu/list',
    method: 'post',
  })
}
//获取table数据
export const getTable = (url:string,method:string,params:any) => {
  return request({
    url: url,
    method: method,
    data: params
  })
}
//获取菜单详情
export function getMenuDetail (params:any){
  return request({
    url: '/system/menu/detail',
    method: 'post',
    data:params
  })
}
//删除菜单
export function deletemenu (params:any){
  return request({
    url: '/system/menu/delete',
    method: 'post',
    data:params
  })
}
// 获取路由
export function getMenuList (params:any){
  return request({
    url: '/system/menu/all',
    method: 'post',
    data:params
  })
}
//新增菜单
export function addMenu (params:any){
  return request({
    url: '/system/menu/insert',
    method: 'post',
    data:params
  })
}
//修改菜单
export function editMenu (params:any){
  return request({
    url: '/system/menu/update',
    method: 'post',
    data:params
  })
}